#include <iostream>
//
// Created by lingzhitech on 25-9-24.
//

/**
 * 题目简单的修改了一下
 * @return
 */
int main() {
    int a[5]{1, 2, 3, 4, 5};


    auto f = [a](int b)
    {
        int sum = b;
        for (auto i = std::begin(a); i != std::end(a); i++)
        {
            sum += *i;
        }
        return sum;
    };
    std::cout << f(6) << std::endl;
}